package net.xumf.web.controller.member.permission;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.xumf.domain.master.SystemPermission;
import net.xumf.service.master.SystemPermissionService;
import net.xumf.support.model.dto.PageDTO;
import net.xumf.support.model.vo.PageVO;
import net.xumf.web.controller.common.BaseControllerImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(value = "权限管理", description = "权限管理")
@RequestMapping("member/permissions")
public class SystemPermissionController extends BaseControllerImpl<PageDTO, SystemPermissionService, SystemPermission, Integer> {


    @ApiOperation(value = "根据模块Id获取模块对应权限")
    @ApiImplicitParams(
            @ApiImplicitParam(name = "moduleId", value = "模块id", required = true, dataTypeClass = Integer.class, paramType = "queryer"))
    @GetMapping("/get/all/moduleId")
    public PageVO getByModuleIdAndPage(PageDTO pageDTO) {
        return service
                .getByModuleIdAndPage(Integer.valueOf(""), pageDTO);
    }

}